From Macros to Reusable Generative Programming
نویسندگان
چکیده
Generative programming is widely used both to develop new programming languages and to extend existing ones with domain-speci c sub-languages. This paper describes McMicMac, a framework for generative programming. McMicMac uses tree-transforming macros as language speci cations, and enhances them with inherited and synthesized attributes. The enhanced transformers can describe general compilation tasks. Families of these speci cations are grouped into mixin-like collections called vocabularies. Programmers can de ne new languages by composing these vocabularies. We have implemented McMicMac for Scheme and used it to build several systems, including the DrScheme programming environment. The principles of McMicMac carry over to other languages and environments.
منابع مشابه
The bedrock structured programming system: combining generative metaprogramming and hoare logic in an extensible program verifier Citation
We report on the design and implementation of an extensible programming language and its intrinsic support for formal verification. Our language is targeted at low-level programming of infrastructure like operating systems and runtime systems. It is based on a cross-platform core combining characteristics of assembly languages and compiler intermediate languages. From this foundation, we take l...
متن کاملLightweight and Generative Components II: Binary-level Components
Most software component technologies fail to account for lightweight components (those for which a function call is too ineecient or semantically inappropriate) or generative components (those in which the component embodies a method of constructing code rather than actual code). Macro-based systems such as the C++ Standard Template Library are exceptions. They, however, have the disadvantage t...
متن کاملBetter Generative Programming with Generic Aspects
After a brief introduction to generative, generic, and aspect-oriented programming, we point out four key elements that appear in the definition of generative programming and that are addressed in this position paper from the perspective of distributed systems development. Then, based on a concrete RMI distribution example, we start motivating how the expressiveness power of generics and the cr...
متن کاملBetter Generative Programming with Generic Aspects.fm
After a brief introduction to generative, generic, and aspect-oriented programming, we point out four key elements that appear in the definition of generative programming and that are addressed in this position paper from the perspective of distributed systems development. Then, based on a concrete RMI distribution example, we start motivating how the expressive power of generics and the crossc...
متن کاملLightweight and Generative Components 2: Binary-Level Components
Current \software component" technologies | with one exception | fail to account for lightweight components | those for which a function call is too ineecient or semantically inappropriate | and for generative components | those in which the component embodies a method of constructing code rather than actual code. The exception is the C++ Standard Template Library. It, however, has the disadvan...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1999